home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / File::Spec::Mac.Z / File::Spec::Mac
Encoding:
Text File  |  1998-10-28  |  5.3 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      FFFFiiiilllleeee::::::::SSSSppppeeeecccc::::::::MMMMaaaacccc((((3333))))22223333////JJJJuuuullll////99998888    ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222FFFF))))iiiilllleeee::::::::SSSSppppeeeecccc::::::::MMMMaaaacccc((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       File::Spec::Mac - File::Spec for MacOS
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.       require File::Spec::Mac;
  13.  
  14.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.       Methods for manipulating file    specifications.
  16.  
  17.      MMMMEEEETTTTHHHHOOOODDDDSSSS
  18.       canonpath
  19.         On MacOS, there's nothing to be done.  Returns what    it's
  20.         given.
  21.  
  22.       catdir
  23.         Concatenate    two or more directory names to form a complete
  24.         path ending    with a directory.  Put a trailing : on the end
  25.         of the complete path if there isn't    one, because that's
  26.         what's done    in MacPerl's environment.
  27.  
  28.         The    fundamental requirement    of this    routine    is that
  29.  
  30.               File::Spec->catdir(split(":",$path)) eq $path
  31.  
  32.         But    because    of the nature of Macintosh paths, some
  33.         additional possibilities are allowed to make using this
  34.         routine give resonable results for some common situations.
  35.         Here are the rules that are    used.  Each argument has its
  36.         trailing ":" removed.  Each    argument, except the first,
  37.         has    its leading ":"    removed.  They are then    joined
  38.         together by    a ":".
  39.  
  40.         So
  41.  
  42.               File::Spec->catdir("a","b") = "a:b:"
  43.               File::Spec->catdir("a:",":b") = "a:b:"
  44.               File::Spec->catdir("a:","b") = "a:b:"
  45.               File::Spec->catdir("a",":b") = "a:b"
  46.               File::Spec->catdir("a","","b") = "a::b"
  47.  
  48.         etc.
  49.  
  50.         To get a relative path (one    beginning with :), begin the
  51.         first argument with    :  or put a "" as the first argument.
  52.  
  53.         If you don't want to worry about these rules, never    allow
  54.         a ":" on the ends of any of    the arguments except at    the
  55.         beginning of the first.
  56.  
  57.         Under MacPerl, there is an additional ambiguity.  Does the
  58.         user intend    that
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      FFFFiiiilllleeee::::::::SSSSppppeeeecccc::::::::MMMMaaaacccc((((3333))))22223333////JJJJuuuullll////99998888    ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222FFFF))))iiiilllleeee::::::::SSSSppppeeeecccc::::::::MMMMaaaacccc((((3333))))
  71.  
  72.  
  73.  
  74.               File::Spec->catfile("LWP","Protocol","http.pm")
  75.  
  76.         be relative    or absolute?  There's no way of    telling    except
  77.         by checking    for the    existance of LWP: or :LWP, and even
  78.         there he may mean a    dismounted volume or a relative    path
  79.         in a different directory (like in @INC).   So those    checks
  80.         aren't done    here. This routine will    treat this as
  81.         absolute.
  82.  
  83.       catfile
  84.         Concatenate    one or more directory names and    a filename to
  85.         form a complete path ending    with a filename.  Since    this
  86.         uses catdir, the same caveats apply.  Note that the
  87.         leading : is removed from the filename, so that
  88.  
  89.               File::Spec->catfile($ENV{HOME},"file");
  90.  
  91.         and
  92.  
  93.               File::Spec->catfile($ENV{HOME},":file");
  94.  
  95.         give the same answer, as one might expect.
  96.  
  97.       curdir
  98.         Returns a string representing of the current directory.
  99.  
  100.       rootdir
  101.         Returns a string representing the root directory.  Under
  102.         MacPerl, returns the name of the startup volume, since
  103.         that's the closest in concept, although other volumes
  104.         aren't rooted there.  On any other platform    returns    '',
  105.         since there's no common way    to indicate "root directory"
  106.         across all Macs.
  107.  
  108.       updir
  109.         Returns a string representing the parent directory.
  110.  
  111.       file_name_is_absolute
  112.         Takes as argument a    path and returns true, if it is    an
  113.         absolute path.  In the case    where a    name can be either
  114.         relative or    absolute (for example, a folder    named "HD" in
  115.         the    current    working    directory on a drive named "HD"),
  116.         relative wins.  Use    ":" in the appropriate place in    the
  117.         path if you    want to    distinguish unambiguously.
  118.  
  119.       path
  120.         Returns the    null list for the MacPerl application, since
  121.         the    concept    is usually meaningless under MacOS. But    if
  122.         you're using the MacPerl tool under    MPW, it    gives back
  123.         $ENV{Commands} suitably split, as is done in
  124.         :lib:ExtUtils:MM_Mac.pm.
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 10/23/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      FFFFiiiilllleeee::::::::SSSSppppeeeecccc::::::::MMMMaaaacccc((((3333))))22223333////JJJJuuuullll////99998888    ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222FFFF))))iiiilllleeee::::::::SSSSppppeeeecccc::::::::MMMMaaaacccc((((3333))))
  137.  
  138.  
  139.  
  140.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  141.       the _F_i_l_e::_S_p_e_c manpage
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                        (printed 10/23/98)
  196.  
  197.  
  198.  
  199.